/*
*用途：新闻表
*作者：hwq
*创建日期：2019-01-14 16:50
*/
const Sequelize = require('sequelize')
const sequelize = require('./sequelize')

const News = sequelize.define('news', {
  id: { type: Sequelize.INTEGER, allowNull: false, autoIncrement: true, primaryKey: true },
  title: { type: Sequelize.STRING, allowNull: false },
  desc: { type: Sequelize.STRING(500) },
  addtime: { type: Sequelize.DATE },
  tag: { type: Sequelize.STRING },
  click: { type: Sequelize.INTEGER, defaultValue: 0 },
  images: { type: Sequelize.STRING },
  content: { type: Sequelize.TEXT }
})

module.exports = News